package J20250227_dfs;
import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description: 时间显示——https://www.lanqiao.cn/paper/3883/problem/1452/
 * User: 王圆豪
 * Date: 2025-03-20
 * Time: 20:57
 */


public class Main8 {
    static long n;
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        n = scan.nextLong();
        long HH = n/1000/3600;
        long h = HH % 24;
        long MM = n/1000/60 - HH*60;
        long m = MM % 60;
        long SS = n/1000 - 3600*HH - 60*MM;
        long s = SS%60;
        System.out.println(String.format("%02d",h) + ":" + String.format("%02d",m) + ":" + String.format("%02d",s));
        scan.close();
    }
}
